<?php
namespace App\Http\Responses;

class ApiResponse
{
    public static function success($data = null){
        return response()->json([
            'code' => 0,
            'msg' => '请求成功',
            'data' => $data
        ]);
    }


    public static function error($data = null){

        return response()->json([
            'code' => 0,
            'msg' => '请求失败',
            'data' => $data
        ]);
    }
}
